package com.wen.tian.enums;

import lombok.Getter;

/**
 * @author tww
 * ClassName: CommonEnum.java、
 * createTime: 2020年11月04日 16:33:15
 **/
@Getter
public enum CommonEnum implements BaseErrorInfoInterface {
    // 数据操作错误定义
    SUCCESS(200, "成功!"),
    NOT_FOUND(404, "未找到该资源!"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误!"),
    NULL(500, "空指针异常"),
    PHONE_NOT_FOUND(500, "手机号已存在"),
    UNKNOWN_USER_OR_PASSWORD(500, "用户或密码错误"),
    USER_NOT_EXEIT(401, "用户不存在");


    /**
     * 状态码
     */
    private Integer resultCode;

    /**
     * 状态描述
     */
    private String resultMsg;


    CommonEnum(Integer resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public Integer getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }

}
